<%-- 
    Document   : manage_jobseekers
    Created on : Apr 13, 2012, 11:37:52 AM
    Author     : dhananjay
--%>






<%@page import="jobportal.Dbconn"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@include file="header.jsp"%>


<%
            String content = "";
            try {
                Connection con = Dbconn.getConn();
                Statement st = con.createStatement();
                ResultSet rs = st.executeQuery("select content from emailmessage where id='BlankMail'");
                if (rs.next()) {
                    content = rs.getString("content");
                }
                st.close();
                con.close();
            } catch (Exception e) {
                out.println(e);
            }
%>

<div id="dialog-form" title="Send Email">
    <br/><p class="validateTips">&nbsp;All form fields are required.</p>
    <br/>
    <label for="Subject1"><strong>Subject :</strong></label>
    <br/>&nbsp;<input type="text" name="subject1" id="subject1"  class="validate[required] text ui-widget-content ui-corner-all" style="width: 375px" />
    <br/><br/><label for="message1"><strong>Message :</strong></label>
    <br/>&nbsp;<textarea cols="50" rows="10"  id="message1" name="message1" class="text ui-widget-content ui-corner-all"  ><%=content%></textarea>

</div>


<script>
    
    function toggleChecked(status) {
        $(".checkbox").each( function() {
            $(this).attr("checked",status);
        })
    }
   
</script>

<table class="blnavbg" style="border-top: 1px solid rgb(255, 255, 255); border-bottom: 1px solid rgb(255, 255, 255);" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody>


    </tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-left:2px">
    <tr>
        <td colspan="2">
            <center>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-left:2px">

                </table>
            </center></td>
    </tr>
    <tr>
        <td align="center" valign="top" style="padding-left:2px">



            <br />
            <span class="mainheading">Jobseekers Manager </span>&raquo;&nbsp;
            <strong>Jobseekers/Candidates Found : <span class="messagesred"></span></strong>
            <img src="../images/blank.gif" alt="blank" width="18" height="17" border="0" /><br>
            <br>
            <span>

            </span>



            <br />



            <br/>
            <%
                        Connection con = null;
                        Statement st = null;
                        ResultSet rs = null;
                        //jscode=&candiname=&keyword=&skills=&exp1=&qualif=&location=&status=&Search=Search
                        String adminverify = "";
                        String jscode = "", keyword = "", skills = "", qualif = "", location = "", status = "", candiname = "";
                        int exp1 = 0;
                        try {
                            if (request.getParameter("jscode") != null) {
                                jscode = request.getParameter("jscode");
                            }
                            if (request.getParameter("candiname") != null) {
                                candiname = request.getParameter("candiname");
                            }
                            if (request.getParameter("keyword") != null) {
                                keyword = request.getParameter("keyword");
                            }
                            if (request.getParameter("skills") != null) {
                                skills = request.getParameter("skills");
                            }
                            if (request.getParameter("exp1") != null && !request.getParameter("exp1").equals("")) {
                                exp1 = Integer.parseInt(request.getParameter("exp1"));
                            }
                            if (request.getParameter("location") != null) {
                                location = request.getParameter("location");
                            }
                            if (request.getParameter("status") != null) {
                                status = request.getParameter("status");
                            }
                            if (request.getParameter("adminverify") != null) {
                                adminverify = request.getParameter("adminverify");
                            }


                            con = Dbconn.getConn();
                            st = con.createStatement();

            %>
            <script>
                jQuery(document).ready(function(){
                   
                    jQuery("#frm1").validationEngine();
                });
            </script>

            <form name="frm1" id="frm1"  action="manage_jobseekers" >


                <input type="button" id="SendEmail" name="sendmail" value="Send Email" class="button2"/>



                <input type="hidden" id="sub" name="sub" value="">
                <input type="hidden" id="mssg" name="mssg" value="">
                <input type="hidden" id="action" name="action" value="">

                <input name="suspend" type="submit"  id="suspend" value="Suspend" class="button2"/>
                <input name="active" type="submit"  id="active" value="Active" class="button2"/>
                <input name="delete" type="submit"  id="delete" onclick="javascript: return confirm('Do you really want to delete the Jobseeker(s)?');" value="Delete" class="button2"/>

                <table width="100%" border="0" cellspacing="1" cellpadding="0" style="border: 1px solid rgb(169, 211, 225);">

                    <tr>
                        <td height="24" colspan="2" align="center" class="bluebg">
                            <input type="checkbox"   name="checkall" class="radio" onclick="toggleChecked(this.checked)" />                            </td>
                        <td width="8%" class="bluebg">&nbsp;</td>
                        <td width="23%" class="bluebg"><strong>Jobseekers Details </strong></td>
                        <td class="bluebg"><strong>College</strong></td>
                        <td class="bluebg"><strong>Previous Employers</strong></td>
                        <td class="bluebg"><strong>Contact Details </strong></td>
                    </tr>
                    <div id="checkall">
                        <%  //String sql = "select name,student.username,gender,dob,title,student.status,clgname,employer,salary,exp,student.address,student.city,student.state,email,student.contact from student,college,exprience,resume where student.username=exprience.username(+) and student.username=resume.username and student.clgid=college.clgid";

                                                    /*jscode="",keyword="",skills="",qualif="",location="",status="";
                                                    int exp1=0;*/
                                                    String sql = "select name,student.username,gender,dob,title,student.status,clgname,employer,salary,exp,student.address,student.city,student.state,email,student.contact,student.adminverify"
                                                            + " FROM  student "
                                                            + "     LEFT JOIN  exprience ON student.username = exprience.username"
                                                            + "     LEFT JOIN resume resume ON student.username = resume.username"
                                                            + "     LEFT JOIN college ON student.clgid = college.clgid"
                                                            + "     where student.username is not null ";
                                                    if (!jscode.equals("")) {
                                                        sql = sql + "and     student.username like '%" + jscode + "%' ";
                                                    }
                                                    if (!candiname.equals("")) {
                                                        sql = sql + "and     student.name like '%" + candiname + "%' ";
                                                    }

                                                    if (!keyword.equals("")) {
                                                        sql = sql + "and     title like '%" + keyword + "%' ";
                                                    }
                                                    if (!skills.equals("")) {
                                                        sql = sql + "and     keyskill like '%" + skills + "%' ";
                                                    }
                                                    if (!location.equals("")) {
                                                        sql = sql + "and     student.city like '%" + location + "%' ";
                                                    }
                                                    if (exp1 > 0) {
                                                        sql = sql + "     and exp >= " + exp1;
                                                    }

                                                    // out.println(sql);
                                                    rs = st.executeQuery(sql);
                                                    while (rs.next()) {




                        %>
                        <tr>
                            <td height="20" colspan="2" align="center" valign="top" bgcolor="#F3F3F3" class="greybg">
                                <input name="cmcheck[]" type="checkbox" id="cmcheck[]" value="<%=rs.getString("username")%>" class="validate[minCheckbox[1]] checkbox radio">
                            </td>
                            <td align="left" valign="top" bgcolor="#F3F3F3" class="greybg"><img src="../src/getpic.jsp?id=<%=rs.getString("username")%>&table=student&col=photo&pk_col=username" width="76" height="87"/></td>
                            <td align="left" valign="top" bgcolor="#F3F3F3" class="greybg"><p class="alink">
                                    <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("name")%></a> (<a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("username")%></a>)<br />Gender:
                                    <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("gender")%></a><br/>
                                    Birth Date:
                                    <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("dob")%></a><br/>
                                    Resume Title : <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("title")%></a><br />
                                    College  Status : <strong>
                                        <%if (rs.getString("status") != null && rs.getString("status").equalsIgnoreCase("verified")) {%>
                                        <font color='#00CC00'><%=rs.getString("status")%></font>
                                        <%} else {%>
                                        <font color='red'><%=rs.getString("status")%></font>
                                        <%}%>
                                    </strong> <br/>
                                    Account  Status :<strong>
                                        <%if (rs.getString("adminverify") != null && rs.getString("adminverify").equalsIgnoreCase("Active")) {%>
                                        <font color='#00CC00'> <%=rs.getString("adminverify")%></font>
                                        <%} else {%>
                                        <font color='red'> <%=rs.getString("adminverify")%></font>
                                        <%}%>

                                    </strong><br />
                                </p>
                            </td>
                            <td width="15%" align="left" valign="top" bgcolor="#F3F3F3" class="greybg"><a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("clgname")%></a></td>
                            <td width="23%" align="left" valign="top" bgcolor="#F3F3F3" class="greybg"><span class="alink">CompName :<a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("employer")%></a><br />
                                    Salary: <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("salary")%></a><br />
                                    Experience : <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("exp")%></a> yrs(s)</span></td>
                            <td width="29%" align="left" valign="top" bgcolor="#F3F3F3" class="greybg">Location : <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("address")%></a>, <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("city")%></a>, <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("state")%></a><br />
                                Email : &nbsp;<a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("email")%></a><br />
                                Mobile :                                                        <a href="viewresumeadmin.jsp?username=<%=rs.getString("username")%>" target="_blank"><%=rs.getString("contact")%></a></td>
                        </tr>

                        <%
                                        }
                                    } catch (Exception e) {
                                        out.println("Exception::" + e);
                                    }
                        %>
                    </div>
                    <tr>
                        <td height="20" colspan="7" align="right" valign="top" class="greybg">
                            1&nbsp;&nbsp;<span class='alink_blue'><a href='/admin/manage_jobseekers.jsp?cur_page=1&amp;start=1&amp;end=5&&'>2</a></span>&nbsp;&nbsp;<span class='alink_blue'><a href='/admin/manage_jobseekers.jsp?cur_page=2&amp;start=1&amp;end=5&&'>3</a></span>&nbsp;&nbsp;<span class='alink_blue'><a href='/admin/manage_jobseekers.jsp?cur_page=3&amp;start=1&amp;end=5&&'>4</a></span>&nbsp;&nbsp;<span class='alink_blue'><a href='/admin/manage_jobseekers.jsp?cur_page=4&amp;start=1&amp;end=5&&'>5</a></span>&nbsp;&nbsp;<span class='alink_blue'>
                                <a href='/admin/manage_jobseekers.jsp?cur_page=1&&page_record=next&&total_records=10&&start=1&amp;end=5&&'>Next</a></span>&nbsp;&nbsp;<span class='alink_blue'>
                                <a href='/admin/manage_jobseekers.jsp?cur_page=4&&page_record=next&&total_records=10&&start=1&amp;end=5&&'>Last</a></span>&nbsp;&nbsp;</td>
                    </tr>
                </table>
            </form>
        </td>
    </tr>
    <tr>
        <td height="337" colspan="2">&nbsp;</td>
    </tr>
    <tr>
        <td colspan="2"><style type="text/css">
        <!--
        .style1 {font-size: xx-small}
        -->
    </style>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tbody><tr><td><DIV class="GrayTxt SmFont PadFive" align=right><span class="style1"></span><BR>
                    </DIV>
                </td></tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
        </tbody></table></td>
</tr>
</table>

<%@include file="footer.jsp" %>